Ratio Based Stable In-Place Merging

نویسندگان

  • Pok-Son Kim
  • Arne Kutzner
چکیده

We investigate the problem of stable in-place merging from a ratio k = n m based point of view where m, n are the sizes of the input sequences with m ≤ n . We introduce a novel algorithm for this problem that is asymptotically optimal regarding the number of assignments as well as comparisons. Our algorithm uses knowledge about the ratio of the input sizes to gain optimality and does not stay in the tradition of Mannila and Ukkonen’s work [8] in contrast to all other stable in-place merging algorithms proposed so far. It has a simple modular structure and does not demand the additional extraction of a movement imitation buffer as needed by its competitors. For its core components we give concrete implementations in form of Pseudo Code. Using benchmarking we prove that our algorithm performs almost always better than its direct competitor proposed in [6]. As additional sub-result we show that stable in-place merging is a quite simple problem for every ratio k ≥ √ m by proving that there exists a primitive algorithm that is asymptotically optimal for such ratios.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Optimal Stable Merging

This paper shows how to stably merge two sequences A and B of sizes m and n, m n, respectively, with O…m ‡ n† assignments, O…m log…n=m ‡ 1†† comparisons and using only a constant amount of additional space. This result matches all known lower bounds and closes an open problem posed by Dudzinski and Dydek in 1981. Our algorithm is based on the unstable algorithm of Mannila and Ukkonen. All techn...

متن کامل

Asymptotically Eecient In-place Merging ?

Two linear-time algorithms for in-place merging are presented. Both algorithms perform at most m(t+1)+n=2 t +o(m) comparisons, where m and n are the sizes of the input sequences, m n, and t = blog 2 (n=m)c. The rst algorithm is for unstable merging and it carries out no more than 3(n+m)+o(m) element moves. The second algorithm is for stable merging and it accomplishes at most 5n+12m+o(m) moves.

متن کامل

On Optimal and Efficient in Place Merging

We introduce a new stable in place merging algorithm that needs O(m log( n m +1)) comparisons and O(m+n) assignments. According to the lower bounds for merging our algorithm is asymptotically optimal regarding the number of comparisons as well as assignments. The stable algorithm is developed in a modular style out of an unstable kernel for which we give a definition in pseudocode. The literatu...

متن کامل

Map-merging in Multi-robot Simultaneous Localization and Mapping Process Using Two Heterogeneous Ground Robots

In this article, a fast and reliable map-merging algorithm is proposed to produce a global two dimensional map of an indoor environment in a multi-robot simultaneous localization and mapping (SLAM) process. In SLAM process, to find its way in this environment, a robot should be able to determine its position relative to a map formed from its observations. To solve this complex problem, simultan...

متن کامل

A Provably, Linear Time, In-place and Stable Merge Algorithm via the Perfect Shuffle

We reconsider a previously published (Dalkilic et al.) algorithm for merging lists by way of the perfect shuffle permutation. The original publication gave only experimental results which, although consistent with linear execution time on the samples tested, provided no analysis. Here we prove that the time complexity, in the average case, is indeed linear, although there is a Θ(n) worst case. ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008